package com.hddf.project.dao;

import java.util.List;

import org.hibernate.Session;

import com.hddf.project.pojos.FirstCategory;

public interface FirstCategoryDao {

	/**
	 * 添加一级类别
	 * 
	 * @param fc
	 * @param s
	 */
	public void add(FirstCategory fc, Session s) throws Exception;

	/**
	 * 删除一级类别
	 * 
	 * @param first_category_id
	 * @param s
	 */
	public void delete(int first_category_id, Session s) throws Exception;

	/**
	 * 删除一级类别
	 * 
	 * @param first_category_id
	 * @param s
	 */
	public void delete(FirstCategory fc, Session s) throws Exception;

	/**
	 * 修改一级类别
	 * 
	 * @param fc
	 * @param s
	 */
	public void update(FirstCategory fc, Session s) throws Exception;

	/**
	 * 获取指定一级类别
	 * 
	 * @param first_category_id
	 * @param s
	 * @return
	 */
	public FirstCategory get(int first_category_id, Session s) throws Exception;

	/**
	 * 根据名字获取一级类别
	 * 
	 * @param name
	 * @param s
	 * @return
	 */
	public FirstCategory getByName(String name, Session s) throws Exception;

	/**
	 * 获取全部一级类别
	 * 
	 * @param s
	 * @return
	 */
	public List<FirstCategory> getList(Session s) throws Exception;

	/**
	 * 获取全部的一级分类ID
	 * 
	 * @param s
	 * @return
	 */
	public List<FirstCategory> getAllFirstCategoryId(Session s);

}
